import 'package:app_03/page_about.dart';
import 'package:app_03/page_archive.dart';
import 'package:flutter/material.dart';

main() {
  runApp(MaterialApp(home: StatelessHome()));
}

class StatelessHome extends StatelessWidget {
  const StatelessHome({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('bar'),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          const Text(
            '主页',
            style: TextStyle(fontSize: 40),
          ),
          ElevatedButton(onPressed: () {}, child: Text('ok')),
          ElevatedButton(onPressed: () {}, child: Text('ok')),
          ElevatedButton(
              onPressed: () {
                Navigator.push(
                    context,
                    MaterialPageRoute(
                        builder: (_) =>
                            PageAbout(data_from_caller: '张三的订单完成情况')));
              },
              child: Text('关于')),
          ElevatedButton(
              onPressed: () {
                Navigator.push(
                    context,
                    MaterialPageRoute(
                        builder: (_) => PageArchive(
                            data_from_caller: 'jex v3.1 aie8a7kae')));
              },
              child: const Text('归档'))
        ],
      ),
    );
  }
}
